class CreatePhoneTypes < ActiveRecord::Migration
  def self.up
    create_table :phone_types do |t|
      t.string :phone_type           ,:limit => 16
      t.integer :is_locked           ,:limit => 1 ,:default => 0 #是否管理会要锁定 1为True 0为False
      t.timestamps
    end
    PhoneType.create(:phone_type =>'移动电话')
    PhoneType.create(:phone_type =>'小灵通')
    PhoneType.create(:phone_type =>'家庭电话')
    PhoneType.create(:phone_type =>'公司电话')
    PhoneType.create(:phone_type =>'公司传真')
  end
  
  def self.down
    drop_table :phone_types
  end
end
